﻿// File_Logs_Dlg.cpp: 实现文件
//

#include "pch.h"
#include "SakerProject.h"
#include "File_Logs_Dlg.h"
#include "afxdialogex.h"


// CFile_Logs_Dlg 对话框
CFile_Logs_Dlg m_File_Logs;

IMPLEMENT_DYNAMIC(CFile_Logs_Dlg, CDialogEx)

CFile_Logs_Dlg::CFile_Logs_Dlg(CWnd* pParent /*=nullptr*/)
	: CDialogEx(IDD_File_Logs, pParent)
{

}

CFile_Logs_Dlg::~CFile_Logs_Dlg()
{
}

void CFile_Logs_Dlg::DoDataExchange(CDataExchange* pDX)
{
	CDialogEx::DoDataExchange(pDX);
}


BEGIN_MESSAGE_MAP(CFile_Logs_Dlg, CDialogEx)
	ON_NOTIFY(NM_CUSTOMDRAW, IDC_LIST_Logs, &CFile_Logs_Dlg::OnNMCustomdrawListLogs)
	ON_NOTIFY(NM_DBLCLK, IDC_LIST_Logs, &CFile_Logs_Dlg::OnNMDblclkListLogs)
END_MESSAGE_MAP()


// CFile_Logs_Dlg 消息处理程序


BOOL CFile_Logs_Dlg::OnInitDialog()
{
	CDialogEx::OnInitDialog();
	mmFile_Logs._Init((CListCtrl*)m_File_Logs.GetDlgItem(IDC_LIST_Logs));

	return TRUE;
}


void CFile_Logs_Dlg::OnNMCustomdrawListLogs(NMHDR *pNMHDR, LRESULT *pResult)
{
	NMLVCUSTOMDRAW* lplvcd = reinterpret_cast<NMLVCUSTOMDRAW*>(pNMHDR);
	mmFile_Logs.CustomDraw(lplvcd, pResult);
}


void CFile_Logs_Dlg::OnNMDblclkListLogs(NMHDR *pNMHDR, LRESULT *pResult)
{
	LPNMITEMACTIVATE pNMItemActivate = reinterpret_cast<LPNMITEMACTIVATE>(pNMHDR);
	mmFile_Logs.ClearList();
	*pResult = 0;
}
